<h1>Modification de machine</h1>

<%= error_messages_for :box %>

<% form_for(:box, :url => box_path(@box), :html => { :method => :put }) do |f| %>
  <p>
    <b>Nom</b><br />
    <%= f.text_field :name %>
  </p>

  <p>
    <b>Ip</b><br />
    <%= f.text_field :ip %>
  </p>

  <p>
    <b>Salle</b><br />
    <%= f.select :room_id, (Room.find :all).collect { |room| [room.name, room.id] } %>
  </p>

  <p>
    <%= submit_tag "Update" %>
  </p>
<% end %>

<%= link_to 'Afficher', box_path(@box) %> |
<%= link_to 'Retour aux machines', boxes_path %>